const redis = require("redis");
const redisClient = redis.createClient({
  url: 'redis://localhost:6378'
});
redisClient.connect()
redisClient.on("connect", function () {
  console.log("Connected to Redis");
});
// 监听错误事件
redisClient.on("error", function (err) {
  console.log("Error: " + err);
});
module.exports = redisClient